<?
global $db;

$e = $db->query1("select * from node where id = ".$db->sqlint($params["id"]));

skin_param("page",$e);
echo $e["content"];

$r = $db->query("select * from node where parentid = ".$db->sqlint($params["id"])); 

if ($e["uri"]) { header("Location: {$e["uri"]}"); die; }

foreach ($r as $e) {
	echo "<p>";
	echo "<a href=\"../{$e["id"]}/\">{$e["title"]}</a>";
	echo "<br>";
	echo "{$e["summary"]}";
	echo "</p>";
	}


#echo "<a href='products.php'>whatever</a>";
?>